/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jpa.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author julio
 */
@Entity
@Table(name = "stops")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Stops.findAll", query = "SELECT s FROM Stops s"),
    @NamedQuery(name = "Stops.findByStopId", query = "SELECT s FROM Stops s WHERE s.stopId = :stopId"),
    @NamedQuery(name = "Stops.findByStopCode", query = "SELECT s FROM Stops s WHERE s.stopCode = :stopCode"),
    @NamedQuery(name = "Stops.findByStopName", query = "SELECT s FROM Stops s WHERE s.stopName = :stopName"),
    @NamedQuery(name = "Stops.findByStopDesc", query = "SELECT s FROM Stops s WHERE s.stopDesc = :stopDesc"),
    @NamedQuery(name = "Stops.findByStopLat", query = "SELECT s FROM Stops s WHERE s.stopLat = :stopLat"),
    @NamedQuery(name = "Stops.findByStopLon", query = "SELECT s FROM Stops s WHERE s.stopLon = :stopLon"),
    @NamedQuery(name = "Stops.findByZoneId", query = "SELECT s FROM Stops s WHERE s.zoneId = :zoneId"),
    @NamedQuery(name = "Stops.findByStopUrl", query = "SELECT s FROM Stops s WHERE s.stopUrl = :stopUrl"),
    @NamedQuery(name = "Stops.findByLocationType", query = "SELECT s FROM Stops s WHERE s.locationType = :locationType"),
    @NamedQuery(name = "Stops.findByParentStation", query = "SELECT s FROM Stops s WHERE s.parentStation = :parentStation")})
public class Stops implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "stop_id")
    private String stopId;
    @Size(max = 45)
    @Column(name = "stop_code")
    private String stopCode;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "stop_name")
    private String stopName;
    @Size(max = 255)
    @Column(name = "stop_desc")
    private String stopDesc;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 11)
    @Column(name = "stop_lat")
    private String stopLat;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 11)
    @Column(name = "stop_lon")
    private String stopLon;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "zone_id")
    private String zoneId;
    @Size(max = 45)
    @Column(name = "stop_url")
    private String stopUrl;
    @Size(max = 2)
    @Column(name = "location_type")
    private String locationType;
    @Size(max = 45)
    @Column(name = "parent_station")
    private String parentStation;

    public Stops() {
    }

    public Stops(String stopId) {
        this.stopId = stopId;
    }

    public Stops(String stopId, String stopName, String stopLat, String stopLon, String zoneId) {
        this.stopId = stopId;
        this.stopName = stopName;
        this.stopLat = stopLat;
        this.stopLon = stopLon;
        this.zoneId = zoneId;
    }

    public String getStopId() {
        return stopId;
    }

    public void setStopId(String stopId) {
        this.stopId = stopId;
    }

    public String getStopCode() {
        return stopCode;
    }

    public void setStopCode(String stopCode) {
        this.stopCode = stopCode;
    }

    public String getStopName() {
        return stopName;
    }

    public void setStopName(String stopName) {
        this.stopName = stopName;
    }

    public String getStopDesc() {
        return stopDesc;
    }

    public void setStopDesc(String stopDesc) {
        this.stopDesc = stopDesc;
    }

    public String getStopLat() {
        return stopLat;
    }

    public void setStopLat(String stopLat) {
        this.stopLat = stopLat;
    }

    public String getStopLon() {
        return stopLon;
    }

    public void setStopLon(String stopLon) {
        this.stopLon = stopLon;
    }

    public String getZoneId() {
        return zoneId;
    }

    public void setZoneId(String zoneId) {
        this.zoneId = zoneId;
    }

    public String getStopUrl() {
        return stopUrl;
    }

    public void setStopUrl(String stopUrl) {
        this.stopUrl = stopUrl;
    }

    public String getLocationType() {
        return locationType;
    }

    public void setLocationType(String locationType) {
        this.locationType = locationType;
    }

    public String getParentStation() {
        return parentStation;
    }

    public void setParentStation(String parentStation) {
        this.parentStation = parentStation;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (stopId != null ? stopId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Stops)) {
            return false;
        }
        Stops other = (Stops) object;
        if ((this.stopId == null && other.stopId != null) || (this.stopId != null && !this.stopId.equals(other.stopId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.entities.Stops[ stopId=" + stopId + " ]";
    }
    
}
